/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.digitaldiary.notify;

import java.util.Timer;
import java.util.TimerTask;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ApplicationScoped;

/**
 *
 * @author Sanjay
 */
@ManagedBean(eager=true)
@ApplicationScoped
public class MailBean {

    /** Creates a new instance of NewJSFManagedBean */
    public MailBean() {
       
    }
   @PostConstruct
   public void init(){    
        TimerTask mailController= new MailController();  
        Timer timer= new Timer();
       timer.scheduleAtFixedRate(mailController, 3000, 1000);
   
   }
}